<!-- 提示信息 -->
<app-tip [type]="tipType"></app-tip>
<app-load *ngIf="isLoading"></app-load>
<div class="header">
  <div class="left flex left-header-box" [routerLink]="['/main/ess/ess-list']" id="btn-back">
    <div class="left-icon">
      <i class="fa fa-angle-left back-icon" aria-hidden="true"></i>
    </div>
    <div class="left-name">
      <span class="back-name">返回</span>
    </div>
  </div>
  <div class="center">出库记录</div>
</div>

<div class="main">
  <div class="search-box">
    <div class="search flex" style="padding-bottom: .7em">
      <div class="start">开始时间：</div>
      <div class="input">
        <input type="date" class="search-input" [(ngModel)]="params.startTime"  id="start-time" value="">
      </div>
    </div>
    <div class="search flex" style="padding-bottom: .7em">
      <div class="start"> 结束时间：</div>
      <div class="input">
        <input type="date" class="search-input" [(ngModel)]="params.endTime">
      </div>
    </div>
    <div class="search flex">
      <div class="start">关键字：</div>
      <div class="input">
        <input type="text"
               name="key"
               class="search-input"
               placeholder="搜索关键字"
               [(ngModel)]="params.key"
               style="text-indent: 10px;">
      </div>
    </div>
    <br>
    <div style="text-align: center;">
      <span class="search-btn" (click)="getData(true)">搜索</span>
      <span class="search-btn" style="background: #3385ff;margin-left: 2em">重置</span>
    </div>
  </div>

  <!--<div style="font-weight: 600;font-size: 1.2em;padding-left: 1em;background: #fff;border-top: 2px solid #3c8dbc;height:3em;line-height:3em;text-align: left;color: #666;">-->
  <!--点击列表查看订单详情-->
  <!--</div>-->
  <div class="record-box">
    <div class="record-list" *ngFor="let v of list">
      <div class="record-item flex">
        <div class="record-item-name">物料名称</div>
        <div class="record-item-text">{{v.name}}</div>
      </div>
      <div class="record-item flex" >
        <div class="record-item-name">数量</div>
        <div class="record-item-text">{{v.num}}</div>
      </div>
      <div class="record-item flex" >
        <div class="record-item-name">单位</div>
        <div class="record-item-text">{{v.unit}}</div>
      </div>
      <div class="record-item flex" >
        <div class="record-item-name">出库类型</div>
        <div class="record-item-text">{{v.type==0?'自动扣除':'提货'}}</div>
      </div>
      <div class="record-item flex" >
        <div class="record-item-name">订单号/提货人</div>
        <div class="record-item-text">
          <span *ngIf="v.type==0">{{v.ordernum}}</span>
          <span *ngIf="v.type==1">{{v.delivery_name}}</span>
        </div>
      </div>
      <div class="record-item flex">
        <div class="record-item-name">创建人姓名</div>
        <div class="record-item-text">{{v.creat_uname}}</div>
      </div>
      <div class="record-item flex">
        <div class="record-item-name">创建时间</div>
        <div class="record-item-text">{{v.creat_time}}</div>
      </div>

      <!--<div class="record-detail-link"><span>查看详情</span></div>-->
    </div>
  </div>

  <div class="load-data" *ngIf="loading">
    <p class="load-data-icon">
      <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
    </p>
    <p class="load-data-text">
      数据加载中
    </p>
  </div>

  <div class="load-more" *ngIf="totalPage > params.start" (click)="getData()">
    <i class="fa fa-spinner fa-spin fa-fw"></i> <span>点击加载更多...</span>
  </div>
</div>
<div class="no-data" *ngIf="!list.length">
  <p class="load-data-description">
    <i class="fa fa-info-circle"></i> <span>暂无统计数据</span>
  </p>
</div>
